﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using onHaj.Code.BusinessLogic;

namespace Hajj_Umrah
{
    public partial class Contact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {


            onSoftMail mail = new onSoftMail(HttpContext.Current);
            var messageParameters = new Dictionary<string, string>();
            messageParameters.Add("{Name}", dfsName.Text);
            messageParameters.Add("{Email}", dfsEmail.Text);
            messageParameters.Add("{Phone}", dfsPhone.Text);
            messageParameters.Add("{DateOfBirth}", MonthDDL.Text + DayDDL.Text);
            messageParameters.Add("{Hear}", dfsHear.Text);
            messageParameters.Add("{Comments}", dfsComments.Text);
            





            mail.SendMail(@"html/ContactConfirmation.html", dfsEmail.Text, "Contact Confirmation", messageParameters);
            mail.SendMail(@"html/CNotification.html", "travelsaverhajj@gmail.com", "Hajj Contact Notification", messageParameters);

            Response.Redirect("Thanks.aspx");





            
            
            
            // bp.BusinessLogic.Mail mail = new bp.BusinessLogic.Mail();
           // //Confirmation page that will be sent to the user
           // string msg = mail.SendMail(Server.MapPath("ContactConfirmation.html"), "mail.bpwe.net", "travel_saver@hotmail.com", dfsEmail.Text,
           //                           "root@bpwe.net", "Nv4c7df7", "Thank You: Travel Saver", dfsName.Text, "",
           //                           "", Guid.NewGuid(), "", "", "");



           // //notification page
           // mail.SendMail(Server.MapPath("ContactNotification.html"), "mail.bpwe.net", dfsEmail.Text, "travel_saver@hotmail.com",
           // "root@bpwe.net", "Nv4c7df7", "Contact Notification", "Travel Saver Hajj and Umrah", "",


           //dfsName.Text + "<br/>" + "Email Address:" + dfsEmail.Text + "<br/>" + "Date of Birth:" + MonthDDL.Text + DayDDL.Text + "<br/>" + "How did you hear about us:" + dfsHear.Text + "<br/>" + "Other:" + dfsOther.Text, Guid.NewGuid(), "", "", "");

           // Response.Redirect("Thanks.aspx");
        }
    }
}